package com.naizhuai.ui.entity;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Depiction:简单的key-value类
 * Author:code
 * Date:2018/3/26
 */

public class SimpleKeyValueBean implements Serializable {

    private int key;
    private String value;
    private String exValue;

    public SimpleKeyValueBean() {}

    public SimpleKeyValueBean(int key, String value) {
        this.key = key;
        this.value = value;
    }

    public SimpleKeyValueBean(int key, String value, String exValue) {
        this.key = key;
        this.value = value;
        this.exValue = exValue;
    }

    public String getExValue() {
        return exValue;
    }

    public void setExValue(String exValue) {
        this.exValue = exValue;
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public void setKeyValue(int key,String value){
        this.key=key;
        this.value=value;
    }

    public static List<SimpleKeyValueBean> getTypeListValues(int key,List<String> values){
        List<SimpleKeyValueBean> keyValues=new ArrayList<>();
        for (String value:values) {
            keyValues.add(new SimpleKeyValueBean(key,value));
        }
        return keyValues;
    }
}
